package com.code.day10.test02;

public abstract class Animal {
    String color;
    int leg;
    public abstract void eat();

    public Animal(String color, int leg) {
        this.color = color;
        this.leg = leg;
    }

    public int getLeg() {
        return leg;
    }

    public void setLeg(int leg) {
        this.leg = leg;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Animal{" +
                "color='" + color + '\'' +
                ", leg=" + leg +
                '}';
    }
}
